<?php

    // +----------------------------------------------------------------------
    // | 广告位
    // +----------------------------------------------------------------------
    // | Copyright (c) 2015-2024 http://www.yicmf.com, All rights reserved.
    // +----------------------------------------------------------------------
    // | Author: 微尘 <yicmf@qq.com>
    // +----------------------------------------------------------------------

    namespace app\model\cms;

    class AdvertisingSpace extends Common
    {

        public static function getList()
        {
            return self::where('status',1)->column('title','id');
        }

        public static function getStoreList()
        {
            return self::where('status',1)->where('id',5)->column('title','id');
        }
        /**
         * 包含的广告
         * @author  : 微尘 <yicmf@qq.com>
         * @datetime: 2019/1/21 13:51
         */
        public function items()
        {
            return $this->hasMany(Advertising::class);
        }

        // 类型转换
        protected $type = [
//            'type' => 'array'
        ];
    }
